Page({
  data: {
    detail: {},
  },
  onLoad({ id }) {
    this.id = id
    this.getDetail(id)
  },
  async getDetail(id) {
    const res = await wx.http.get(`/room/${id}`)
    this.setData({
      detail: res.data,
    })
  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.id,
    })
  },
})
